package com.gitee.wsl.mathematics.coordinate.d2

import com.gitee.wsl.mathematics.coordinate.Coordinate
import com.gitee.wsl.mathematics.coordinate.d3.Coordinate3
import com.gitee.wsl.mathematics.vector.vec2.Vector2
import com.gitee.wsl.mathematics.vector.vec2.Vector2D
import com.gitee.wsl.mathematics.vector.vec2.Vector2F

typealias Point2D = Coordinate2<Double,*>
typealias Point2F = Coordinate2<Float,*>
typealias Point2<T,V> = Coordinate2<T,V>

interface Coordinate2<T:Number,V: Coordinate2<T, V>>: Coordinate<T, V>, Vector2<T, V> {

    //override val vec2: Coordinate2<T, *>
    override val vec3: Coordinate3<T, *>


    //override infix fun angleTo(other: Coordinate2<T, *>):T = acos(dot(other) / (length * other.length))

    //override infix fun angleTo(other: Coordinate3<T, *>):T = other angleTo this

//    infix fun angleTo(other: Vector4) = other angleTo this

}

interface  Coordinate2F<V: Coordinate2<Float,V>> : Coordinate2<Float, V>, Vector2F<V>

interface  Coordinate2D<V: Coordinate2<Double,V>> : Coordinate2<Double, V>, Vector2D<V>